package com.zxs.properties;

import com.zxs.aspect.DingTalkAspect;
import jakarta.annotation.Resource;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
@EnableConfigurationProperties(ZxsProperties.class)
@ComponentScan("com.zxs")
public class ZxsAutoConfig implements WebMvcConfigurer {

    @Resource
    private  ZxsProperties zxsProperties;

    public ZxsAutoConfig(ZxsProperties zxsProperties) {
        this.zxsProperties = zxsProperties;
    }

    @Bean
    public DingTalkAspect dingTalkAspect(){
        return new DingTalkAspect();
    }
}
